#!/usr/bin/env just --justfile

set shell := ['bash', '-c']

dockercompose := `if docker-compose --version &> /dev/null; then echo "docker-compose"; else echo "docker compose"; fi`

@_default:
    just --list

build:
    {{dockercompose}} build

clean:
    rm -rf frontend/node_modules

frontend *ARGS:
    {{dockercompose}} up frontend {{ARGS}}

[no-exit-message]
frontend-sh:
    {{dockercompose}} run --interactive --entrypoint sh frontend

up:
    {{dockercompose}} up

up-backend:
    {{dockercompose}} up db tiles --detach

up-build:
    {{dockercompose}} up --build
